import { AppRouteRecordRaw } from '@/types/route'
import { shallowRef } from 'vue'
import Layout from '@/layout/index.vue'

export let basicRouter: AppRouteRecordRaw[] = [
  {
    path: '/basic',
    name: 'basic',
    component: shallowRef(Layout),
    meta: {
      title: '基础设置',
      hideRootMenu: true
    },
    children: [
      {
        path: '/system/user',
        component: () => import(/* webpackChunkName: "system" */ '@/views/system/user/userManage.vue'),
        name: 'userManage',
        meta: { title: '用户管理', icon: 'icon-houtaiyonghuguanli' }
      },
      {
        path: '/system/role',
        component: () => import(/* webpackChunkName: "system" */ '@/views/system/role/roleManage.vue'),
        name: 'roleManage',
        meta: { title: '角色管理', icon: 'icon-jiaoseguanli' }
      },
      {
        path: '/system/authority',
        component: () => import(/* webpackChunkName: "system" */ '@/views/system/authority/authorityManage.vue'),
        name: 'authorityManage',
        meta: { title: '权限管理', icon: 'icon-quanxianguanli' }
      },
      {
        path: '/system/log',
        component: () => import(/* webpackChunkName: "system" */ '@/views/system/log/operationLog.vue'),
        name: 'operationLog',
        meta: { title: '操作日志', icon: 'icon-caozuorizhi' }
      }
    ]
  }
]

export default basicRouter
